package com.ymatou.iapi.anlisettlement.bean;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.math.BigDecimal;

import com.ymttest.database.sharding.db.sharding.model.OrderDetailPo;

public class AnliCatalogSettlementDetailBean implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2345251324695164246L;

	/*
	 * 有结算明细的orderDetail
	 */
	private OrderDetailPo orderDetailPo;
	
	private int childHunterLevel;
	
	private int productType;
	
	private long orderId;
	
	private BigDecimal paidAmount;
	
	private BigDecimal perPaidAmount;
	
	private BigDecimal settlementAmount;
	
	private BigDecimal perSettlementAmount;
	
	private BigDecimal rebateRatio;
	
	private BigDecimal sellerRebateRatio;
	
	private int productCount;
	
	private Boolean isRefund;

	public OrderDetailPo getOrderDetailPo() {
		return orderDetailPo;
	}

	public void setOrderDetailPo(OrderDetailPo orderDetailPo) {
		this.orderDetailPo = orderDetailPo;
	}

	public int getChildHunterLevel() {
		return childHunterLevel;
	}

	public void setChildHunterLevel(int childHunterLevel) {
		this.childHunterLevel = childHunterLevel;
	}

	public int getProductType() {
		return productType;
	}

	public void setProductType(int productType) {
		this.productType = productType;
	}

	public long getOrderId() {
		return orderId;
	}

	public void setOrderId(long orderId) {
		this.orderId = orderId;
	}

	public BigDecimal getPerPaidAmount() {
		return perPaidAmount;
	}

	public void setPerPaidAmount(BigDecimal perPaidAmount) {
		this.perPaidAmount = perPaidAmount;
	}

	public BigDecimal getSettlementAmount() {
		return settlementAmount;
	}

	public void setSettlementAmount(BigDecimal settlementAmount) {
		this.settlementAmount = settlementAmount;
	}
	
	public BigDecimal getPerSettlementAmount() {
		return perSettlementAmount;
	}

	public void setPerSettlementAmount(BigDecimal perSettlementAmount) {
		this.perSettlementAmount = perSettlementAmount;
	}

	public BigDecimal getRebateRatio() {
		return rebateRatio;
	}

	public void setRebateRatio(BigDecimal rebateRatio) {
		this.rebateRatio = rebateRatio;
	}

	public BigDecimal getPaidAmount() {
		return paidAmount;
	}

	public void setPaidAmount(BigDecimal paidAmount) {
		this.paidAmount = paidAmount;
	}

	public BigDecimal getSellerRebateRatio() {
		return sellerRebateRatio;
	}

	public void setSellerRebateRatio(BigDecimal sellerRebateRatio) {
		this.sellerRebateRatio = sellerRebateRatio;
	}

	public int getProductCount() {
		return productCount;
	}

	public void setProductCount(int productCount) {
		this.productCount = productCount;
	}
	
	public Boolean getIsRefund() {
		return isRefund;
	}

	public void setIsRefund(Boolean isRefund) {
		this.isRefund = isRefund;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public AnliCatalogSettlementDetailBean deepClone() {
		
		AnliCatalogSettlementDetailBean anliCatalogSettlementDetailBean = null;
		
		try {
			// 写入字节流
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			ObjectOutputStream oos = new ObjectOutputStream(baos);
			oos.writeObject(this);

			ByteArrayInputStream bais = new ByteArrayInputStream(
					baos.toByteArray());
			ObjectInputStream ois = new ObjectInputStream(bais);
			anliCatalogSettlementDetailBean = (AnliCatalogSettlementDetailBean) ois
					.readObject();
		} catch (IOException | ClassNotFoundException e) {
			e.printStackTrace();
		}

		return anliCatalogSettlementDetailBean;
	}
 }
